<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shops', function (Blueprint $table) {
            $table->increments('shop_id')->comment('店铺id');
            $table->string('shop_name',60);
            $table->string('shop_intro',255)
            ->comment('店铺描述')->deafult('这个家伙很难，什么都没留下');
            $table->unsignedInteger('agent_id')->comment('店长Id');
            $table->string('shop_logo',255)->comment('店铺Logo')->deafult('www.baidu.com');
            $table->char('shop_mobile',12)->comment('手机号')->deafult('')->unique();
            $table->string('banner_logo',255)->comment('店铺banner图');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shops');
    }
}
